package com.gengao.springbootcase.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
@Order(1)
@Component
@Aspect
@Slf4j
public class MyAspect1 {
    @Before("com.gengao.springbootcase.aop.TimeAspect.pt()")
    public void before(){
        log.info("before...");
    }

    @Around("com.gengao.springbootcase.aop.TimeAspect.pt()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info("around before...");
        Object result = joinPoint.proceed();
        log.info("after around");
        return result;
    }

    @After("com.gengao.springbootcase.aop.TimeAspect.pt()")
    public void after(){
        log.info("after...");

    }
}
